package com.example.dog.core.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.example.dog.core.actions.Behavior;
import com.example.dog.core.actions.impl.DogEatBehavior;
import com.example.dog.core.actions.impl.DogPlayBehavior;
import com.example.dog.core.actions.impl.DogSleepBehavior;
import com.example.dog.core.actions.impl.DogThinkBehavior;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class Dog implements Serializable {

    private static final long serialVersionUID = 4604386150072722828L;
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private String name;
    private Integer age;
    private String photo;
    private Integer tiredValue;
    private Integer limitValue;
    @TableField(exist = false)
    private Behavior[] behaviors = {new DogPlayBehavior(10),new DogThinkBehavior(10),new DogEatBehavior(10),new DogSleepBehavior(10)};
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    private LocalDateTime updateTime;
    /**
     * 备注信息
     */
    private String remarks;
}
